%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ft=erlang ts=4 sw=4 et

%% Platform-specific installation paths
{platform_bin_dir,      "./bin"}.
{platform_data_dir,     "./data"}.
{platform_etc_dir,      "./etc"}.
{platform_lib_dir,      "./lib"}.
{platform_log_dir,      "./log"}.
{cuttlefish_schema_dir, "./share/schema"}.
{platform_share_dir,        "./share"}.

%%
%% etc/vm.args
%%
{node,                  "@NODE@"}.
{crash_dump,            "{{platform_log_dir}}/erl_crash.dump"}.

%%
%% bin/vmq
%%
{runner_script_dir,     "$(cd `dirname $0` ; /bin/pwd)"}.
{runner_base_dir,       "$(cd `dirname $0` ; /bin/pwd)/.."}.
{runner_bin_dir,        "$RUNNER_SCRIPT_DIR/"}.
{runner_etc_dir,        "$RUNNER_BASE_DIR/etc"}.
{runner_log_dir,        "$RUNNER_BASE_DIR/log"}.
{runner_lib_dir,        "$RUNNER_BASE_DIR/lib"}.
{runner_patch_dir,      "$RUNNER_BASE_DIR/lib/erlio-patches"}.
{pipe_dir,              "/tmp/$RUNNER_BASE_DIR/"}.
{runner_user,           ""}.
{runner_wait_process,   "vmq_cluster_node_sup"}.
{runner_ulimit_warn,    65536}.

%% vmq_server
{nodename, "@NODE@"}.
{max_connections, 10000}.
{max_nr_of_acceptors, 10}.
{tls_handshake_timeout, 5000}.
{mqtt_default_ip, "127.0.0.1"}.
{mqtt_default_port, @MQTTPORT@}.
{mqtt_default_ws_ip, "127.0.0.1"}.
{mqtt_default_ws_port, @MQTTWSPORT@}.
{mqtts_default_ip, "127.0.0.1"}.
{mqtts_default_port, @MQTTSPORT@}.
{cluster_default_ip, "0.0.0.0"}.
{cluster_default_port, @CLUSTERPORT@}.
{cluster_ssl_default_ip, "0.0.0.0"}.
{cluster_ssl_default_port, 44054}.
{http_default_ip, "127.0.0.1"}.
{http_default_port, @METRICSPORT@}.
{https_default_ip, "127.0.0.1"}.
{https_default_port, @HTTPSPORT@}.
{metadata_plugin, vmq_swc}.

%% lager
{console_log_default, both}.

%%
%% cuttlefish
%%
{cuttlefish,            "on"}.
{cuttlefish_conf,       "vernemq.conf"}.